10. Quiz: Tuples

Tuples

QUIZ QUESTION: :

Match the following qualities to their data structure.

ANSWER CHOICES:



Data Structure

Quality

unordered

ordered

ordered

immutable

immutable

mutable

SOLUTION:

Data Structure

Quality

ordered

ordered

ordered

ordered

immutable

immutable

mutable

Tuples

What would the output of the following code be? (Treat the comma in the multiple choice answers as newlines.)

tuple_a = 1, 2
tuple_b = (1, 2)

print(tuple_a == tuple_b)
print(tuple_a[1])
SOLUTION: True, 2

Tuples Playground

Start Quiz:

## You may test any code out here. Use Test Run to see your output